<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>mysql实现读写分离 | 欢迎来到guo的博客!</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="读写分离在Web应用中，读写比例一般在10:1，配置读写分离，写的操作放在主库，从库负责读取数据。可以根据读写的需求调整成一主多从，多主一从，多主多从。 1.Flask实现读写分离在我们创建的model目录的__init__中配置读写分离，创建db 123456789101112131415161718192021222324252627282930313233343536373839# Flas">
<meta property="og:type" content="article">
<meta property="og:title" content="mysql实现读写分离">
<meta property="og:url" content="http://shangguan-lingfeng.gitee.io/blog1/2021/05/13/mysql%E5%AE%9E%E7%8E%B0%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB(%E5%9C%A8%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5%E5%9F%BA%E7%A1%80%E4%B8%8A)/index.html">
<meta property="og:site_name" content="欢迎来到guo的博客!">
<meta property="og:description" content="读写分离在Web应用中，读写比例一般在10:1，配置读写分离，写的操作放在主库，从库负责读取数据。可以根据读写的需求调整成一主多从，多主一从，多主多从。 1.Flask实现读写分离在我们创建的model目录的__init__中配置读写分离，创建db 123456789101112131415161718192021222324252627282930313233343536373839# Flas">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-05-12T16:00:00.000Z">
<meta property="article:modified_time" content="2021-05-14T08:05:59.916Z">
<meta property="article:author" content="Jerry">
<meta property="article:tag" content="mysql">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/blog1/atom.xml" title="欢迎来到guo的博客!" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/blog1/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/blog1/css/style.css">

  
    
<link rel="stylesheet" href="/blog1/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/blog1/" id="logo">欢迎来到guo的博客!</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/blog1/">Home</a>
        
          <a class="main-nav-link" href="/blog1/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/blog1/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Suche"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Suche"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://shangguan-lingfeng.gitee.io/blog1"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-mysql实现读写分离(在主从同步基础上)" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/blog1/2021/05/13/mysql%E5%AE%9E%E7%8E%B0%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB(%E5%9C%A8%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5%E5%9F%BA%E7%A1%80%E4%B8%8A)/" class="article-date">
  <time class="dt-published" datetime="2021-05-12T16:00:00.000Z" itemprop="datePublished">2021-05-13</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      mysql实现读写分离
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h3 id="读写分离"><a href="#读写分离" class="headerlink" title="读写分离"></a>读写分离</h3><p>在Web应用中，读写比例一般在10:1，配置读写分离，写的操作放在主库，从库负责读取数据。<br>可以根据读写的需求调整成一主多从，多主一从，多主多从。</p>
<h5 id="1-Flask实现读写分离"><a href="#1-Flask实现读写分离" class="headerlink" title="1.Flask实现读写分离"></a>1.Flask实现读写分离</h5><p>在我们创建的model目录的__init__中配置读写分离，创建db</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Flask中实现读写分离</span></span><br><span class="line"><span class="comment"># flask_sqlalchemy是对sqlalchemy进行的封装，更适合Flask数据库的使用</span></span><br><span class="line"><span class="keyword">from</span> flask_sqlalchemy <span class="keyword">import</span> SQLAlchemy, SignallingSession, get_state</span><br><span class="line"><span class="keyword">from</span> sqlalchemy <span class="keyword">import</span> orm</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">RoutingSession</span>(<span class="params">SignallingSession</span>):</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">get_bind</span>(<span class="params">self, mapper=<span class="literal">None</span>, clause=<span class="literal">None</span></span>):</span></span><br><span class="line">        state = get_state(self.app)</span><br><span class="line"></span><br><span class="line">        <span class="comment"># _flushing用来判断读写操作</span></span><br><span class="line">        <span class="keyword">if</span> self._flushing:  <span class="comment"># 写操作,使用主数据库，从配置好的master主库写入数据</span></span><br><span class="line">            print(<span class="string">&quot;写入数据&quot;</span>)</span><br><span class="line">            <span class="keyword">return</span> state.db.get_engine(self.app, bind=<span class="string">&#x27;master&#x27;</span>)</span><br><span class="line">        <span class="keyword">else</span>:  <span class="comment"># 读操作,使用从数据库，从配置好的slave</span></span><br><span class="line">            print(<span class="string">&#x27;读取数据&#x27;</span>)</span><br><span class="line">            <span class="keyword">return</span> state.db.get_engine(self.app, bind=<span class="string">&#x27;slave&#x27;</span>)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">RoutingSQLAlchemy</span>(<span class="params">SQLAlchemy</span>):</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">create_session</span>(<span class="params">self, options</span>):</span></span><br><span class="line">        <span class="keyword">return</span> orm.sessionmaker(class_=RoutingSession, db=self, **options)</span><br><span class="line">    </span><br><span class="line"><span class="comment"># 配置中写如下配置</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置数据库绑定地址，设置此地址后就无需之前的数据库链接地址SQLALCHEMY_DATABASE_URI</span></span><br><span class="line">SQLALCHEMY_BINDS = &#123;</span><br><span class="line">    <span class="string">&#x27;master&#x27;</span>: <span class="string">&quot;mysql+pymysql://主库用户:主库密码@8.131.52.82:3306/主库&quot;</span>,</span><br><span class="line">    <span class="string">&#x27;slave&#x27;</span>: <span class="string">&quot;mysql+pymysql://主库创建从库用户(username):password@从服务器IP:3306/从库&quot;</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置是否追踪数据变化。一般不会开启，会影响性能</span></span><br><span class="line">SQLALCHEMY_TRACK_MODIFICATIONS = <span class="literal">False</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置是否打印底层执行的SQL语句</span></span><br><span class="line">SQLALCHEMY_ECHO = <span class="literal">False</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 实例化db的时候:</span></span><br><span class="line">db = RoutingSQLAlchemy(app)</span><br></pre></td></tr></table></figure>
<h5 id="2-Django实现读写分离"><a href="#2-Django实现读写分离" class="headerlink" title="2.Django实现读写分离"></a>2.Django实现读写分离</h5><p>settings.py中配置</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">DATABASES = &#123;</span><br><span class="line"> <span class="string">&#x27;default&#x27;</span>: &#123;</span><br><span class="line"> <span class="string">&#x27;ENGINE&#x27;</span>: <span class="string">&#x27;django.db.backends.mysql&#x27;</span>,</span><br><span class="line"> <span class="string">&#x27;HOST&#x27;</span>: <span class="string">&#x27;127.0.0.1&#x27;</span>, <span class="comment"># 主服务器的运行ip</span></span><br><span class="line"> <span class="string">&#x27;PORT&#x27;</span>: <span class="number">3306</span>, <span class="comment"># 主服务器的运行port</span></span><br><span class="line"> <span class="string">&#x27;USER&#x27;</span>: <span class="string">&#x27;django&#x27;</span>, <span class="comment"># 主服务器的用户名</span></span><br><span class="line"> <span class="string">&#x27;PASSWORD&#x27;</span>: <span class="string">&#x27;django&#x27;</span>, <span class="comment"># 主服务器的密码</span></span><br><span class="line"> <span class="string">&#x27;NAME&#x27;</span>: <span class="string">&#x27;djangobase&#x27;</span> <span class="comment"># 数据库名</span></span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="string">&#x27;slave&#x27;</span>: &#123;</span><br><span class="line"> <span class="string">&#x27;ENGINE&#x27;</span>: <span class="string">&#x27;django.db.backends.mysql&#x27;</span>, </span><br><span class="line"> <span class="string">&#x27;HOST&#x27;</span>: <span class="string">&#x27;127.0.0.1&#x27;</span>, <span class="comment"># 从服务器的运行ip</span></span><br><span class="line"> <span class="string">&#x27;PORT&#x27;</span>: <span class="number">3305</span>, <span class="comment"># 从服务器的运行port</span></span><br><span class="line"> <span class="string">&#x27;USER&#x27;</span>: <span class="string">&#x27;django_slave&#x27;</span>, <span class="comment"># 主服务器的用户名</span></span><br><span class="line"> <span class="string">&#x27;PASSWORD&#x27;</span>: <span class="string">&#x27;1234&#x27;</span>, <span class="comment"># 主服务器的密码</span></span><br><span class="line"> <span class="string">&#x27;NAME&#x27;</span>: <span class="string">&#x27;mydatabase&#x27;</span> <span class="comment"># 从数据库名</span></span><br><span class="line"> &#125;</span><br><span class="line">&#125;　　</span><br></pre></td></tr></table></figure>
<p>对数据库进行迁移</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">python manage.py makemigrations <span class="comment"># 在migrations文件夹下生成记录</span></span><br><span class="line">python manage.py migrate --database default <span class="comment"># 默认可以不写参数</span></span><br><span class="line">python manage.py migrate --database db2 <span class="comment"># 在从库再迁移一次，就可以在上面建立相同的表</span></span><br></pre></td></tr></table></figure>
<p>在项目的<strong>init</strong>.py文件下配置,将数据连接方式改为pymysql</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> pymysql</span><br><span class="line">pymysql.install_as_MySQLdb()</span><br></pre></td></tr></table></figure>
<p>自动读写分离</p>
<p>通过配置数据库路由，来自动实现读写分离，这样就不需要每次读写都手动指定数据库。<br>在项目的app中创建db_router.py文件,并在该文件中定义一个数据库路由类,用来进行读写分离，这个类最多提供四个方法，分别是：db_for_read、<br>db_for_write、allow_relation、allow_migrate，以下只写了三个。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">MasterSlaveDBRouter</span>(<span class="params"><span class="built_in">object</span></span>):</span></span><br><span class="line"> <span class="string">&quot;&quot;&quot;数据库主从读写分离路由&quot;&quot;&quot;</span></span><br><span class="line"> </span><br><span class="line"> <span class="function"><span class="keyword">def</span> <span class="title">db_for_read</span>(<span class="params">self, model, **hints</span>):</span></span><br><span class="line"> <span class="string">&quot;&quot;&quot;读数据库&quot;&quot;&quot;</span></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;slave&quot;</span></span><br><span class="line"> </span><br><span class="line"> <span class="function"><span class="keyword">def</span> <span class="title">db_for_write</span>(<span class="params">self, model, **hints</span>):</span></span><br><span class="line"> <span class="string">&quot;&quot;&quot;写数据库&quot;&quot;&quot;</span></span><br><span class="line"> <span class="keyword">return</span> <span class="string">&quot;default&quot;</span></span><br><span class="line"> </span><br><span class="line"> <span class="function"><span class="keyword">def</span> <span class="title">allow_relation</span>(<span class="params">self, obj1, obj2, **hints</span>):</span></span><br><span class="line"> <span class="string">&quot;&quot;&quot;是否运行关联操作&quot;&quot;&quot;</span></span><br><span class="line"> <span class="keyword">return</span> <span class="literal">True</span></span><br></pre></td></tr></table></figure>
<p>settings.py文件中配置</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">DATABASE_ROUTERS = [<span class="string">&quot;app001.db_router.MasterSlaveDBRouter&quot;</span>]</span><br></pre></td></tr></table></figure>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://shangguan-lingfeng.gitee.io/blog1/2021/05/13/mysql%E5%AE%9E%E7%8E%B0%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB(%E5%9C%A8%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5%E5%9F%BA%E7%A1%80%E4%B8%8A)/" data-id="ckomwm8uy0003cguhfeww8jhq" data-title="mysql实现读写分离" class="article-share-link">Teilen</a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog1/tags/mysql/" rel="tag">mysql</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/blog1/2021/05/14/docker+CentOS+mysql%E5%AE%9E%E7%8E%B0%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Neuer</strong>
      <div class="article-nav-title">
        
          docker+CentOS+mysql实现主从同步
        
      </div>
    </a>
  
  
    <a href="/blog1/2021/05/12/%E5%9C%A8%E9%A1%B9%E7%9B%AE%E4%B8%AD%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Älter</strong>
      <div class="article-nav-title">在项目中自动生成接口文档</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/CentOS/" rel="tag">CentOS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/Flask/" rel="tag">Flask</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/django/" rel="tag">django</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/docker/" rel="tag">docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/gitee/" rel="tag">gitee</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/linux/" rel="tag">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/mysql/" rel="tag">mysql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/python/" rel="tag">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/python%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" rel="tag">python基础知识</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/vue/" rel="tag">vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/webshell/" rel="tag">webshell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/%E4%BA%91%E4%B8%BB%E6%9C%BA%E5%AE%9E%E7%8E%B0%E8%A7%86%E9%A2%91%E7%9B%B4%E6%92%AD/" rel="tag">云主机实现视频直播</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/%E5%85%B3%E4%BA%8E%E7%AC%AC%E4%B8%89%E6%96%B9/" rel="tag">关于第三方</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/blog1/tags/CentOS/" style="font-size: 17.5px;">CentOS</a> <a href="/blog1/tags/Flask/" style="font-size: 10px;">Flask</a> <a href="/blog1/tags/django/" style="font-size: 12.5px;">django</a> <a href="/blog1/tags/docker/" style="font-size: 12.5px;">docker</a> <a href="/blog1/tags/gitee/" style="font-size: 10px;">gitee</a> <a href="/blog1/tags/linux/" style="font-size: 10px;">linux</a> <a href="/blog1/tags/mysql/" style="font-size: 12.5px;">mysql</a> <a href="/blog1/tags/python/" style="font-size: 15px;">python</a> <a href="/blog1/tags/python%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" style="font-size: 17.5px;">python基础知识</a> <a href="/blog1/tags/redis/" style="font-size: 12.5px;">redis</a> <a href="/blog1/tags/vue/" style="font-size: 20px;">vue</a> <a href="/blog1/tags/webshell/" style="font-size: 10px;">webshell</a> <a href="/blog1/tags/%E4%BA%91%E4%B8%BB%E6%9C%BA%E5%AE%9E%E7%8E%B0%E8%A7%86%E9%A2%91%E7%9B%B4%E6%92%AD/" style="font-size: 10px;">云主机实现视频直播</a> <a href="/blog1/tags/%E5%85%B3%E4%BA%8E%E7%AC%AC%E4%B8%89%E6%96%B9/" style="font-size: 12.5px;">关于第三方</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archiv</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/05/">五月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/04/">四月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/03/">三月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/02/">二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/01/">一月 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">letzter Beitrag</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/blog1/2021/05/14/docker+CentOS+mysql%E5%AE%9E%E7%8E%B0%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/">docker+CentOS+mysql实现主从同步</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/13/mysql%E5%AE%9E%E7%8E%B0%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB(%E5%9C%A8%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5%E5%9F%BA%E7%A1%80%E4%B8%8A)/">mysql实现读写分离</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/12/%E5%9C%A8%E9%A1%B9%E7%9B%AE%E4%B8%AD%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3/">在项目中自动生成接口文档</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/12/mysql%E5%AE%9E%E7%8E%B0%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/">mysql实现主从同步</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/09/CentOS%E9%83%A8%E7%BD%B2flask%E9%A1%B9%E7%9B%AE/">nginx部署flask项目</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2021 Jerry<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/blog1/" class="mobile-nav-link">Home</a>
  
    <a href="/blog1/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/blog1/js/jquery-3.4.1.min.js"></script>



  
<script src="/blog1/fancybox/jquery.fancybox.min.js"></script>




<script src="/blog1/js/script.js"></script>





  </div>
</body>
</html>